Skip to main content

commandKey

Type​

function

Summary​

Returns the state of the Command key.

Syntax​

the commandKey
commandKey()

Description​

Use the commandKey function to check whether the Command key is being pressed.

On Unix and Windows systems, the commandKey function returns the same value as the controlKey function: the two functions are synonyms.

Examples​

put commandKey() after keyHistory
if the commandKey is down then edit script of me

Value​

NameTypeDescription

return

The commandKey function returns "down" if the key is pressed and "up" if it's not.

constant: left, up

control structure: function

function: controlKey, value, keysDown

glossary: function, return, Command key

message: commandKeyDown

Compatibility and Support​

Introduced

LiveCode 1.0

OS

mac

windows

linux

Platforms

desktop

server

Thank you for your feedback!

Was this page helpful?